<!doctype HTML public "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- Click to Convert 5.2: Anything to HTML -->
<!-- http://www.clicktoconvert.com -->

<html>
<head>
<title>gravityboxscheduleuserguide - page 60 of 234</title>
<meta http-equiv=content-type content=text/html;charset=iso-8859-1>
<meta name="Generator" content="Click to Convert">

<!--Start of page styles-->
<STYLE TYPE="text/css">
<!--
 /* Foreground Image Styles */

 /* Position Styles */
 .ts60p0{position:absolute;left:106px;top:97px;}
 .ts60p1{position:absolute;left:352px;top:97px;}
 .ts60p3{position:absolute;left:672px;top:97px;}
 .ts60p7{position:absolute;left:106px;top:113px;}
 .ts60p8{position:absolute;left:706px;top:1026px;}
 .ts60p9{position:absolute;left:331px;top:1044px;}
 .ts60p13{position:absolute;left:106px;top:147px;}
 .ts60p15{position:absolute;left:106px;top:165px;}
 .ts60p18{position:absolute;left:106px;top:183px;}
 .ts60p20{position:absolute;left:106px;top:201px;}
 .ts60p22{position:absolute;left:106px;top:220px;}
 .ts60p24{position:absolute;left:106px;top:238px;}
 .ts60p26{position:absolute;left:106px;top:256px;}
 .ts60p28{position:absolute;left:106px;top:274px;}
 .ts60p31{position:absolute;left:106px;top:292px;}
 .ts60p33{position:absolute;left:106px;top:310px;}
 .ts60p35{position:absolute;left:106px;top:328px;}
 .ts60p37{position:absolute;left:106px;top:346px;}
 .ts60p39{position:absolute;left:106px;top:365px;}
 .ts60p41{position:absolute;left:106px;top:383px;}
 .ts60p43{position:absolute;left:106px;top:401px;}
 .ts60p45{position:absolute;left:106px;top:419px;}
 .ts60p47{position:absolute;left:106px;top:437px;}
 .ts60p48{position:absolute;left:106px;top:455px;}
 .ts60p50{position:absolute;left:106px;top:473px;}
 .ts60p52{position:absolute;left:106px;top:491px;}
 .ts60p53{position:absolute;left:106px;top:510px;}
 .ts60p56{position:absolute;left:106px;top:528px;}
 .ts60p57{position:absolute;left:106px;top:546px;}
 .ts60p58{position:absolute;left:154px;top:546px;}
 .ts60p59{position:absolute;left:106px;top:565px;}
 .ts60p60{position:absolute;left:106px;top:583px;}
 .ts60p62{position:absolute;left:106px;top:602px;}
 .ts60p63{position:absolute;left:106px;top:620px;}
 .ts60p64{position:absolute;left:106px;top:638px;}
 .ts60p66{position:absolute;left:106px;top:657px;}
 .ts60p67{position:absolute;left:106px;top:676px;}
 .ts60p70{position:absolute;left:106px;top:694px;}
 .ts60p71{position:absolute;left:106px;top:712px;}
 .ts60p73{position:absolute;left:106px;top:731px;}
 .ts60p74{position:absolute;left:106px;top:749px;}
 .ts60p76{position:absolute;left:106px;top:767px;}
 .ts60p78{position:absolute;left:106px;top:785px;}
 .ts60p80{position:absolute;left:106px;top:803px;}
 .ts60p82{position:absolute;left:106px;top:821px;}
 .ts60p84{position:absolute;left:106px;top:839px;}
 .ts60p86{position:absolute;left:106px;top:857px;}
 .ts60p89{position:absolute;left:106px;top:876px;}
 .ts60p91{position:absolute;left:106px;top:894px;}
 .ts60p93{position:absolute;left:106px;top:912px;}
 .ts60p95{position:absolute;left:106px;top:930px;}
 .ts60p96{position:absolute;left:106px;top:948px;}
 .ts60p98{position:absolute;left:106px;top:966px;}
 .ts60p100{position:absolute;left:106px;top:984px;}

 /* Font Styles */
 .ft0p60{font-style:normal;font-weight:bold;font-size:13px;font-family:arial,sans-serif;color:#000000;}
 .ft1p60{font-weight:normal;}
 .ft2p60{font-style:normal;font-weight:normal;font-size:13px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft3p60{font-style:normal;font-weight:normal;font-size:16px;font-family:"times new roman","times new roman",times,serif;color:#000000;}
 .ft4p60{font-style:normal;font-weight:bold;font-size:11px;font-family:arial,sans-serif;color:#000000;}
 .ft5p60{font-style:normal;font-weight:normal;font-size:16px;font-family:"courier new",courier,monospace;color:#000000;}
 .ft6p60{font-family:arial,sans-serif;}
 .ft7p60{font-style:normal;font-weight:normal;font-size:16px;font-family:arial,sans-serif;color:#000000;}

 /* Background Style */
 .styleBackground60{position:absolute;left:97px;top:145px}

 /* Navigation Styles */
 .styleNavBarTop{position:absolute;left:0px;top:2px}
 .nb{position:absolute;left:2px;top:0px}
 .nbs{position:absolute;left:0px;top:0px}
 .nbe{position:absolute;left:836px;top:0px}
 .styleNavBarBot{position:absolute;left:0px;top:1117px}
-->
</STYLE>
<!--End of page styles-->

</head>
<body bgcolor="#ffffff" text="#000000" link="#0000FF" Vlink="#660099">

<table id="pageTable" width="836" STYLE="position: relative; left: auto; top: auto;"><tr><td>
<div class=nbs><img src="./navbarstart.gif" width="2" height="30"></div>
<div class=nb><img src="./navbar.gif" width="836" height="30" alt="Navigation bar"></div>
<div class=nbe><img src="./navbarend.gif" width="2" height="30"></div>
<div class=styleNavBarTop>
<table width="834" height="26" border="0" cellspacing="0">
  <tr align="left">
    <td width="4">&nbsp;</td>
    <td width="25" align="center"><a href="http://www.gravitybox.com" target="_parent"><img src="./home.gif" border="0" alt="Home"></a></td>
    <td width="25" align="center"><a href="#" onClick="window.open('./print.html','Printing','width=300,height=100,toolbar=no,directories=no');return false;"><img src="./print.gif" border="0" alt="Print document"></a></td>
    <td width="10" align="center"><img src="./separator.gif" border="0"></td>
    <td width="18" align="center"><a href="./index1.html"><img src="./start.gif" width="18" height="14" border="0" alt="Start"></a></td>
    <td width="18" align="center"><a href="./index59.html"><img src="./back.gif" width="14" height="14" border="0" alt="Previous page"></a></td>
    <td width="80" valign="middle"><table width="100%" height="16" border="0" cellspacing="1" bgcolor="#ACA899"><tr><td align="center" bgcolor="#ffffff"><font face=verdana,arial,sans-serif><font size="1">&nbsp;60 of 234&nbsp;</font></font></td></tr></table></td>
    <td width="18" align="center"><a href="./index61.html"><img src="./forward.gif" width="14" height="14" border="0" alt="Next page"></a></td>
    <td width="18" align="center"><a href="./index234.html"><img src="./end.gif" width="18" height="14" border="0" alt="End"></a></td>
    <td width="620">&nbsp;</td>
  </tr>
</table>
<p>
</div>
<nobr>
<div class=styleBackground60><img src="./background60.png" width="633" height="910" border="0" alt=""></div>
<div class=ts60p0><span class="ft0p60"> </span></div>
<div class=ts60p1><span class="ft0p60">Gravitybox Schedule Primer<span class="ft1p60"> </span></span></div>
<div class=ts60p3><span class="ft0p60">Page 58&nbsp; </span></div>
<div class=ts60p7><span class="ft2p60"> </span></div>
<div class=ts60p8><span class="ft3p60"> </span></div>
<div class=ts60p9><span class="ft4p60">1998&#45;2004 Gravitybox Software LLC<span class="ft3p60"> </span></span></div>
<div class=ts60p13><span class="ft5p60">&nbsp;&nbsp; </span></div>
<div class=ts60p15><span class="ft5p60">&nbsp; 'Load this day's information from the Database </span></div>
<div class=ts60p18><span class="ft5p60">&nbsp; Set Db = New ADODB.Connection </span></div>
<div class=ts60p20><span class="ft5p60">&nbsp; Db.ConnectionString = GetConnectString &#38; AppPath _ </span></div>
<div class=ts60p22><span class="ft5p60">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#38; &#34;schedule.mdb&#34; </span></div>
<div class=ts60p24><span class="ft5p60">&nbsp; Call Db.Open </span></div>
<div class=ts60p26><span class="ft5p60">&nbsp; Set rs = New ADODB.Recordset </span></div>
<div class=ts60p28><span class="ft5p60">&nbsp; Set rs = Db.Execute(&#34;select * from Room order by SortOrder&#34;) </span></div>
<div class=ts60p31><span class="ft5p60">&nbsp;&nbsp; </span></div>
<div class=ts60p33><span class="ft5p60">&nbsp; 'Loop through and display all the appointments </span></div>
<div class=ts60p35><span class="ft5p60">&nbsp; Call Me.Schedule1.Rooms.Clear </span></div>
<div class=ts60p37><span class="ft5p60">&nbsp; While Not rs.EOF </span></div>
<div class=ts60p39><span class="ft5p60">&nbsp;&nbsp;&nbsp; Set objRoom = Me.Schedule1.Rooms.Add(rs!Name) </span></div>
<div class=ts60p41><span class="ft5p60">&nbsp;&nbsp;&nbsp; objRoom.Id = rs!RoomId </span></div>
<div class=ts60p43><span class="ft5p60">&nbsp;&nbsp;&nbsp; Call rs.MoveNext </span></div>
<div class=ts60p45><span class="ft5p60">&nbsp; Wend </span></div>
<div class=ts60p47><span class="ft5p60"> </span></div>
<div class=ts60p48><span class="ft5p60">&nbsp; Set Db = Nothing </span></div>
<div class=ts60p50><span class="ft5p60">&nbsp; Set rs = Nothing </span></div>
<div class=ts60p52><span class="ft5p60"> </span></div>
<div class=ts60p53><span class="ft5p60">End Sub<span class="ft6p60"> </span></span></div>
<div class=ts60p56><span class="ft7p60"> </span></div>
<div class=ts60p57><span class="ft7p60"> </span></div>
<div class=ts60p58><span class="ft7p60">In this example, we are going to give the user the capability of assigning a </span></div>
<div class=ts60p59><span class="ft7p60">category to each appointment. This will give a graphical use to the schedule. The viewer </span></div>
<div class=ts60p60><span class="ft7p60">can see at a glance to which category an appointment belongs by looking at the colored </span></div>
<div class=ts60p62><span class="ft7p60">bar in its left margin. Category setup is very similar to room setup with the addition of a </span></div>
<div class=ts60p63><span class="ft7p60">color parameter. The following code will load the defined categories from the database </span></div>
<div class=ts60p64><span class="ft7p60">into the schedule&#146;s Categories collection. </span></div>
<div class=ts60p66><span class="ft7p60"> </span></div>
<div class=ts60p67><span class="ft5p60">Private Sub LoadCategories() </span></div>
<div class=ts60p70><span class="ft5p60"> </span></div>
<div class=ts60p71><span class="ft5p60">'This procedure Loads a Schedule from the database </span></div>
<div class=ts60p73><span class="ft5p60"> </span></div>
<div class=ts60p74><span class="ft5p60">Dim Db As ADODB.Connection </span></div>
<div class=ts60p76><span class="ft5p60">Dim rs As ADODB.Recordset </span></div>
<div class=ts60p78><span class="ft5p60">Dim objCategory As CCategoryEl </span></div>
<div class=ts60p80><span class="ft5p60">&nbsp;&nbsp; </span></div>
<div class=ts60p82><span class="ft5p60">&nbsp; 'Load this day's information from the Database </span></div>
<div class=ts60p84><span class="ft5p60">&nbsp; Set Db = New ADODB.Connection </span></div>
<div class=ts60p86><span class="ft5p60">&nbsp; Db.ConnectionString = GetConnectString &#38; _ </span></div>
<div class=ts60p89><span class="ft5p60">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; AppPath &#38; &#34;schedule.mdb&#34; </span></div>
<div class=ts60p91><span class="ft5p60">&nbsp; Db.Open </span></div>
<div class=ts60p93><span class="ft5p60">&nbsp; Set rs = New ADODB.Recordset </span></div>
<div class=ts60p95><span class="ft5p60">&nbsp; Set rs = Db.Execute(&#34;select * from Category order by </span></div>
<div class=ts60p96><span class="ft5p60">SortOrder&#34;) </span></div>
<div class=ts60p98><span class="ft5p60">&nbsp;&nbsp; </span></div>
<div class=ts60p100><span class="ft5p60">&nbsp; 'Loop through and display all the appointments </span></div>
<div class=styleNavBarBot>
<table width="836" border="0" cellspacing="2">
  <tr></tr>
  <tr>
    <td width="118"><a href="http://www.purepage.com"><img src="./smalllogo.gif" width="118" height="46" border="0" alt="http://www.purepage.com"></a></td>
    <td></td>
  </tr>
</table>
</div>

</td></tr></table>

</body>
</html>
